﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
namespace DAL
{
   public  class UserInfoDAL
    {
        DBHelper db = new DBHelper();
        public DataTable UserInfoShow(string random) //用户信息显示
        {
            string sql = string.Format("select * from huiyuan where randomcnum='{0}'", random);
            return db.cx(sql );
        }
        public int UserInfoModify(string uname,string mail,string sex,int randomcnum,int id)  //修改个人信息
        {
            String sql = string.Format("UPDATE [dbo].[huiyuan] SET [uname] = '{0}',[mail] = '{1}',[sex] = '{2}' ,  [randomcnum] = '{3}' where  [randomcnum] = '{4}'", uname, mail, sex, randomcnum,id);
            return db.zsg(sql);
        }
    }
}
